home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / FROMUTS / UNIXLIB37B / src / unix / c / unlink < prev    next >
Text File  |  1992-03-16  |  362b  |  24 lines

  1. static char sccs_id[] = "@(#) unlink.c 1.2 "__DATE__" HJR";
  2.  
  3. /* unlink.c (c) Copyright 1990 H.Rogers */
  4.  
  5. #include <errno.h>
  6.  
  7. #include "sys/unix.h"
  8. #include "sys/os.h"
  9.  
  10. int unlink(char *file)
  11. {
  12. os_error *e;
  13.  
  14. file = __uname(file,0); if (!*file) { errno = ENOENT; return(-1); }
  15.  
  16. if (e = os_fsctrl(27,file,0,0642))
  17.   {
  18.   __seterr(e);
  19.   return(-1);
  20.   }
  21.  
  22. return(0);
  23. }
  24.